using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Eamon.MeituanDotnetSDK.api.common.request;
using Eamon.MeituanDotnetSDK.attribute;

namespace Eamon.MeituanDotnetSDK.model.ddzh.ugc.ugcQueryShopReview
{
    /// <summary>
    /// 单一门店查询评论数据
    /// </summary>
    [ApiMeta(
        Path = "/ddzh/ugc/queryshopreview",
        BusinessId = 58,
        ApiVersion = "10003",
        ApiName = "ugc_query_shop_review",
        NeedAuth = true
    )]
    public class UgcQueryShopReviewRequest : MeituanRequest<UgcQueryShopReviewResponse>
    {
        /// <summary>
        /// 星级筛选 1-全部， 2-好评 3-中差评
        /// </summary>
        [Required(ErrorMessage = "star不能为空")]
        [JsonPropertyName("star")]
        public int? Star { get; set; }

        /// <summary>
        /// 查询偏移，从1开始
        /// </summary>
        [Required(ErrorMessage = "offset不能为空")]
        [JsonPropertyName("offset")]
        public int? Offset { get; set; }

        /// <summary>
        /// 每页数量 最大不超过50
        /// </summary>
        [Required(ErrorMessage = "limit不能为空")]
        [JsonPropertyName("limit")]
        public int? Limit { get; set; }

        /// <summary>
        /// 评论添加日期开始，格式如 2016-05-24 10:10:10
        /// </summary>
        [Required(ErrorMessage = "beginTime不能为空")]
        [JsonPropertyName("beginTime")]
        public string BeginTime { get; set; }

        /// <summary>
        /// 评论添加日期结束，格式如 2016-06-24 10:10:10，查询区间最多一年
        /// </summary>
        [Required(ErrorMessage = "endTime不能为空")]
        [JsonPropertyName("endTime")]
        public string EndTime { get; set; }

        /// <summary>
        /// 1-大众点评，2-美团
        /// </summary>
        [Required(ErrorMessage = "platform不能为空")]
        [JsonPropertyName("platform")]
        public int? Platform { get; set; }

        public override string ToString()
        {
            return $"UgcQueryShopReviewRequest{{Star={Star}, Offset={Offset}, Limit={Limit}, BeginTime={BeginTime}, EndTime={EndTime}, Platform={Platform}}}";
        }
    }
}
